
require 'enumerator'
require 'cviceni4\Summable.rb'

class VowelFinder
  
  include Enumerable
  include Summable
  
  def initialize(string)
    @string = string
  end
  
  def each(&blk)
    vowels = @string.scan(/[aeiouyAEIOUY]/)
    vowels.each &blk
  end
  
end

puts ">> Start"

v = VowelFinder.new("A Regexp holds a regular expression, used to match a pattern against strings.");
puts v.inject(:+)
puts v.sum()  

puts "<< Stop"
